// import {Redirect} from 'react-router-dom'
import {
    Dashboard,
    Login,
    NotFound,
    Settings,
    ArticleList,
    ArticleEdit,
    Notifications,
    NoAuth,
    Profile
} from '@/views';


//子路由和父级路由
export const mainRouter = [
    {
        //登录页面
        pathname:'/login',
        component: Login
    },
    {
        pathname:'/404',
        component: NotFound
    }
];

export const adminRourts = [
    {
        pathname:'/admin/dashboard',
        component: Dashboard,
        title:'仪表盘',
        isNav: true,
        icon: 'dashboard',
        role: ['001', '002','003']

    },
    {
        pathname:'/admin/article',
        component: ArticleList,
        exact: true,
        title:'文章管理',
        isNav: true,
        icon: 'unordered-list',
        role: ['001', '002']
    },
    {
        pathname:'/admin/article/edit:id',
        component: ArticleEdit,
        role: ['001']
    },
    {
        pathname:'/admin/settings',
        component: Settings,
        title:'设置',
        isNav: true,
        icon: 'setting',
        role: ['001']
    },
    {
        pathname:'/admin/notifications',
        component: Notifications,
        title:'通知中心',
        isNav: false,
        role: ['001', '002','003']
    },
    {
        pathname:'/admin/noauth',
        component: NoAuth,
        title:'页面权限',
        isNav: false,
        role: ['001', '002','003']
    },
    {
        pathname:'/admin/profile',
        component: Profile,
        title:'个人设置',
        isNav: false,
        role: ['001', '002','003']
    },
]